#! /usr/bin/env python

import rospy
from sensor_msgs.msg import JointState


def doPose(data):
    msg = data
    pub.publish(msg)
if __name__ == "__main__":
    # 2.初始化 ROS 节点
    rospy.init_node("control_circle_p")
    # 3.创建发布者对象
    pub = rospy.Publisher("/joint_states",JointState,queue_size=1000)
    # 4.循环发布运动控制消息
    rate = rospy.Rate(10)
    msg = JointState()
    sub = rospy.Subscriber("/j2n6s300/joint_states",JointState,doPose,queue_size=1000)

    rospy.spin()